<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JavaScript</title>
</head>
<body>
    <span id="span">Hello World</span><br>
    <button onclick="Change()">Click</button><br>
    <input type="text" id="inputID" value=""><br>
    <input type="button" value="点我" onclick="clickMe()">
    <script>
        function Change() {
            var id = document.getElementById('span');
            //id.innerText = "Span";
            id.innerHTML = "<h1 style='color: aqua'>span</h1>"
        }

        function clickMe() {
            var array = document.getElementsByTagName('input');
            console.log(array);
            console.log(array[0]);

            var inputObj = document.getElementsByTagName('input')[0];
            var value = document.getElementsByTagName('input')[0].value;
            alert(value);
        }

        function clickMe1() {
            console.log('clickMe');
            var inputobj = document.getElementById('inputID');
            var value = inputobj.value;
            console.log(value);
        }
    </script>
</body>
</html>